package net.aiform.template.pojo;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import net.aiform.pojo.Identity;

@Entity
@Table(name = "af_item")
public class Item extends Identity implements Serializable {
	private static final long serialVersionUID = -5588427715499713642L;
	private int order;
	@ManyToOne(cascade = CascadeType.REFRESH, optional = false)
	@JoinColumn(name = "option", referencedColumnName = "id")
	private Option option;

	public int getOrder() {
		return order;
	}

	public void setOrder(int order) {
		this.order = order;
	}

	@Override
	public String toString() {
		return "Item [order=" + order + ", code=" + code + ", createTime=" + createTime + ", expireTime=" + expireTime + ", id=" + id + ", name="
				+ name + "]";
	}

	public Option getOption() {
		return option;
	}

	public void setOption(Option option) {
		this.option = option;
	}
}
